/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package logica;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Leandro
 */
public class SuscriptorLog {

    private static SuscriptorLog inst;
    private List<ObservadorLog> obs;

    public List<ObservadorLog> getObs() {
        return obs;
    }

    public void setObs(List<ObservadorLog> obs) {
        this.obs = obs;
    }



    public static SuscriptorLog getInst() {
        if(inst==null){
            inst=new SuscriptorLog();
            inst.setObs(new ArrayList<ObservadorLog>());
        }
        return inst;
    }


     public void addObserver(ObservadorLog o){
        this.obs.add(o);
    }

    public void notificar(String b){
        for(ObservadorLog o: obs){
            o.actualizar(b);
        }
    }


}
